home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
zbpc_460.zip
/
UTILITY.EXE
/
SCROLL.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-03-27
|
2KB
|
52 lines
' These two functions can be used to scroll a window either up or down.
' X1%,Y1% are the coordinates of the upper left corner of the window.
' X2%,Y2% are the coordinates of the lower right corner of the window.
' Attrib% is the color attribute for the new blank line
' Experiment with them a little to get a feel for them.
:
LONG FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
MACHLG &B8,1,6
MACHLG &8A,&3E,Attrib%
MACHLG &8A,&2E,Y1%
MACHLG &8A,&0E,X1%
MACHLG &8A,&36,Y2%
MACHLG &8A,&16,X2%
MACHLG &CD,&10
END FN
:
LONG FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
MACHLG &B8,1,7
MACHLG &8A,&3E,Attrib%
MACHLG &8A,&2E,Y1%
MACHLG &8A,&0E,X1%
MACHLG &8A,&36,Y2%
MACHLG &8A,&16,X2%
MACHLG &CD,&10
END FN
:
COLOR ,31 : CLS : FOR X = 1 TO 25 : PRINT STRING$ (79, RND (100) + 32) : NEXT
X1% = 10 : X2% = 40 : Y1% = 10 :Y2% = 15
"Delay" IF INKEY$ = "" GOTO "Delay"
FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay0" IF INKEY$ = "" GOTO "Delay0"
FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay1" IF INKEY$ = "" GOTO "Delay1"
FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay2" IF INKEY$ = "" GOTO "Delay2"
FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay3" IF INKEY$ = "" GOTO "Delay3"
FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay4" IF INKEY$ = "" GOTO "Delay4"
FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay5" IF INKEY$ = "" GOTO "Delay5"
FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay6" IF INKEY$ = "" GOTO "Delay6"
FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay7" IF INKEY$ = "" GOTO "Delay7"
FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay8" IF INKEY$ = "" GOTO "Delay8"
FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
"Delay9" IF INKEY$ = "" GOTO "Delay9"
INPUT D